home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / ICProgKit 1.3.sit / ICProgKit1.3 / APIs / ICCAPI.h < prev    next >
Text File  |  1996-07-14  |  28KB  |  585 lines

  1. /* ・・・Start Header・・・ */
  2.  
  3. /* File:         ICCAPI.h
  4.  * Generated by: 1.0d4
  5.  * For:          IC 1.3
  6.  * On:           Sunday, 14 July 1996, 20:19:55
  7.  * 
  8.  * This file is part of the Internet Configuration system and
  9.  * is placed in the public domain for the benefit of all.
  10.  */
  11.  
  12. /* ・・・End Header・・・ */
  13.  
  14. /*
  15.     IMPORTANT NOTES ABOUT THE C CONVERSION
  16.     --------------------------------------
  17.     
  18.     o Pascal "var" parameters are converted from "var x : y" to "y *x".  This
  19.       means that when you see the parameter "y *x" you should be aware that
  20.         you *cannot pass in nil*.  In future this restriction may be eased,
  21.         especially for the attr parameter to ICGetPref.  Parameters where nil
  22.         is legal are declared using the explicit pointer type, ie "yPtr x".
  23.  
  24.     o Strings are *Pascal* strings.  This means that they must be word aligned.
  25.         MPW and Think C do this automatically.  The last time I check, Metrowerks
  26.         C does not.  If it still doesn't, then IMHO it's a bug in their compiler
  27.         and you should report it to them.
  28.  
  29.     o The canonical Internet Config interface is defined in Pascal.  These
  30.         headers have not been thoroughly tested.  If there is a conflict between
  31.         these headers and the Pascal interfaces, the Pascal should take precedence.
  32. */
  33.  
  34. /* ///////////////////////////////////////////////////////////////////////////////// */
  35.  
  36. #ifndef __ICCAPI__
  37. #define __ICCAPI__
  38.  
  39. #ifndef __TYPES__
  40. #include <Types.h>
  41. #endif
  42.  
  43. #ifndef __FILES__
  44. #include <Files.h>
  45. #endif
  46.  
  47. #ifndef __COMPONENTS__
  48. #include <Components.h>
  49. #endif
  50.  
  51. #ifndef __ICTYPES__
  52. #include "ICTypes.h"
  53. #endif
  54.  
  55. #ifndef __ICKEYS__
  56. #include "ICKeys.h"
  57. #endif
  58.  
  59. /* //////////////////////////////////////////////////////////////////////////////// */
  60.  
  61. enum {
  62.     internetConfigurationComponentType = 'PREF',                            /* the component type */
  63.     internetConfigurationComponentSubType = 'ICAp',                      /* the component subtype */
  64.     internetConfigurationComponentInterfaceVersion0 = 0x00000000L,
  65.     internetConfigurationComponentInterfaceVersion1 = 0x00010000L,
  66.     internetConfigurationComponentInterfaceVersion2 = 0x00020000L,
  67.     /* current version number is version 2 */
  68.     internetConfigurationComponentInterfaceVersion = internetConfigurationComponentInterfaceVersion2
  69. };
  70.  
  71. typedef ComponentInstance internetConfigurationComponent;
  72.  
  73. #ifdef __cplusplus
  74. extern "C" {
  75. #endif __cplusplus
  76.  
  77. /* ・・・Start ICCAPI.h・・・ */
  78.  
  79. /* ***** Starting Up and Shutting Down ***** */
  80.  
  81. pascal ICError ICCStart(internetConfigurationComponent *inst, OSType creator);
  82.   /* Call this at application initialisation. Set creator to your application
  83.    * creator to allow for future expansion of the IC system. Returns
  84.    * inst as a connection to the IC system.
  85.    */
  86.  
  87. pascal ICError ICCStop(internetConfigurationComponent inst);
  88.   /* It is illegal to call this routine inside a ICBegin/End pair.
  89.    * Call this at application initialisation, after which inst
  90.    * is no longer valid connection to IC.
  91.    */
  92.  
  93. /* ***** Specifying a Configuration ***** */
  94.  
  95. pascal ICError ICCFindConfigFile(internetConfigurationComponent inst, short count, ICDirSpecArrayPtr folders)
  96. FIVEWORDINLINE(0x2F3C, 6, 2, 0x7000, 0xA82A);
  97.   /* It is illegal to call this routine inside a ICBegin/End pair.
  98.    * Call to configure this connection to IC.
  99.    * Set count as the number of valid elements in folders.
  100.    * Set folders to a pointer to the folders to search.
  101.    * Setting count to 0 and folders to nil is OK.
  102.    * Searches the specified folders and then the Preferences folder
  103.    * in a unspecified manner.
  104.    */
  105.  
  106. pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst, ICDirSpec *where)
  107. FIVEWORDINLINE(0x2F3C, 4, 14, 0x7000, 0xA82A);
  108.   /* Requires IC 1.1.
  109.    * It is illegal to call this routine inside a ICBegin/End pair.
  110.    * Similar to ICFindConfigFile except that it only searches the folder
  111.    * specified in where.  If the input parameters are valid the routine
  112.    * will always successful configure the instance, creating an
  113.    * empty configuration if necessary
  114.    * For use with double-clickable preference files.
  115.    */
  116.  
  117. pascal ICError ICCGeneralFindConfigFile(internetConfigurationComponent inst, Boolean search_prefs, Boolean can_create, short count, ICDirSpecArrayPtr folders)
  118. FIVEWORDINLINE(0x2F3C, 10, 30, 0x7000, 0xA82A);
  119.   /* Requires IC 1.2.
  120.    * It is illegal to call this routine inside a ICBegin/End pair.
  121.    * Call to configure this connection to IC.
  122.    * This routine acts as a more general replacement for
  123.    * ICFindConfigFile and ICFindUserConfigFile.
  124.    * Set search_prefs to true if you want it to search the preferences folder.
  125.    * Set can_create to true if you want it to be able to create a new config.
  126.    * Set count as the number of valid elements in folders.
  127.    * Set folders to a pointer to the folders to search.
  128.    * Setting count to 0 and folders to nil is OK.
  129.    * Searches the specified folders and then optionally the Preferences folder
  130.    * in a unspecified manner.
  131.    */
  132.  
  133. pascal ICError ICCChooseConfig(internetConfigurationComponent inst)
  134. FIVEWORDINLINE(0x2F3C, 0, 33, 0x7000, 0xA82A);
  135.   /* Requires IC 1.2.
  136.    * It is illegal to call this routine inside a ICBegin/End pair.
  137.    * Requests the user to choose a configuration, typically using some
  138.    * sort of modal dialog. If the user cancels the dialog the configuration
  139.    * state will be unaffected.
  140.    */
  141.  
  142. pascal ICError ICCChooseNewConfig(internetConfigurationComponent inst)
  143. FIVEWORDINLINE(0x2F3C, 0, 34, 0x7000, 0xA82A);
  144.   /* Requires IC 1.2.
  145.    * It is illegal to call this routine inside a ICBegin/End pair.
  146.    * Requests the user to create a new configuration, typically using some
  147.    * sort of modal dialog. If the user cancels the dialog the configuration
  148.    * state will be unaffected.
  149.    */
  150.  
  151. pascal ICError ICCGetConfigName(internetConfigurationComponent inst, Boolean longname, Str255 name)
  152. FIVEWORDINLINE(0x2F3C, 6, 35, 0x7000, 0xA82A);
  153.   /* Requires IC 1.2.
  154.    * You must specify a configuration before calling this routine.
  155.    * Returns a string that describes the current configuration at a user
  156.    * level. Set longname to true if you want a long name, up to 255
  157.    * characters, or false if you want a short name, typically about 32
  158.    * characters.
  159.    * The returned string is for user display only. If you rely on the
  160.    * exact format of it, you will conflict with any future IC
  161.    * implementation that doesn't use explicit preference files.
  162.    */
  163.  
  164. pascal ICError ICCGetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref)
  165. FIVEWORDINLINE(0x2F3C, 4, 31, 0x7000, 0xA82A);
  166.   /* Requires IC 1.2.
  167.    * You must specify a configuration before calling this routine.
  168.    * Returns a self-contained reference to the instance's current
  169.    * configuration.
  170.    * ref must be a valid non-nil handle and it will be resized to fit the
  171.    * resulting data.
  172.    */
  173.  
  174. pascal ICError ICCSetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref, long flags)
  175. FIVEWORDINLINE(0x2F3C, 8, 32, 0x7000, 0xA82A);
  176.   /* Requires IC 1.2.
  177.    * It is illegal to call this routine inside a ICBegin/End pair.
  178.    * Reconfigures the instance using a configuration reference that was
  179.    * got using ICGetConfigReference reference. Set the
  180.    * icNoUserInteraction_bit in flags if you require that this routine
  181.    * not present a modal dialog. Other flag bits are reserved and should
  182.    * be set to zero.
  183.    * ref must not be nil.
  184.    */
  185.  
  186. pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst, FSSpec *config)
  187. FIVEWORDINLINE(0x2F3C, 4, 3, 0x7000, 0xA82A);
  188.   /* It is illegal to call this routine inside a ICBegin/End pair.
  189.    * For use only by the IC application.
  190.    * If you call this routine yourself, you will conflict with any
  191.    * future IC implementation that doesn't use explicit preference files.
  192.    */
  193.  
  194. /* ***** Getting Information ***** */
  195.  
  196. pascal ICError ICCGetSeed(internetConfigurationComponent inst, long *seed)
  197. FIVEWORDINLINE(0x2F3C, 4, 4, 0x7000, 0xA82A);
  198.   /* You do not have to specify a configuration before calling this routine.
  199.    * You do not have to be inside an ICBegin/End pair to call this routine.
  200.    * Returns the current seed for the IC prefs database.
  201.    * This seed changes each time a non-volatile preference is changed.
  202.    * You can poll this to determine if any cached preferences change.
  203.    */
  204.  
  205. pascal ICError ICCGetPerm(internetConfigurationComponent inst, ICPerm *perm)
  206. FIVEWORDINLINE(0x2F3C, 4, 13, 0x7000, 0xA82A);
  207.   /* You do not have to specify a configuration before calling this routine.
  208.    * Returns the access permissions currently associated with this instance.
  209.    * While applications normally know what permissions they have,
  210.    * this routine is designed for use by override components.
  211.    */
  212.  
  213. pascal ICError ICCDefaultFileName(internetConfigurationComponent inst, Str63 name)
  214. FIVEWORDINLINE(0x2F3C, 4, 11, 0x7000, 0xA82A);
  215.   /* You do not have to specify a configuration before calling this routine.
  216.    * You do not have to be inside an ICBegin/End pair to call this routine.
  217.    * Returns the default file name for IC preference files.
  218.    * Applications should never need to call this routine.
  219.    * If you rely on information returned by this routine yourself,
  220.    * you may conflict with any future IC implementation that doesn't use
  221.    * explicit preference files.
  222.    * The component calls this routine to set up the default IC file name.
  223.    * This allows this operation to be intercepted by a component that has
  224.    * captured us. It currently gets it from the component resource file.
  225.    * The glue version is hardwired to "Internet Preferences".
  226.    */
  227.  
  228. /* ***** Reading and Writing Preferences ***** */
  229.  
  230. pascal ICError ICCBegin(internetConfigurationComponent inst, ICPerm perm)
  231. FIVEWORDINLINE(0x2F3C, 2, 5, 0x7000, 0xA82A);
  232.   /* You must specify a configuration before calling this routine.
  233.    * It is illegal to call this routine inside a ICBegin/End pair.
  234.    * Starting reading or writing multiple preferences.
  235.    * A call to this must be balanced by a call to ICEnd.
  236.    * Do not call WaitNextEvent between these calls.
  237.    * The perm specifies whether you intend to read or read/write.
  238.    * Only one writer is allowed per instance.
  239.    * Note that this may open resource files that are not closed
  240.    * until you call ICEnd.
  241.    */
  242.  
  243. pascal ICError ICCGetPref(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Ptr buf, long *size)
  244. FIVEWORDINLINE(0x2F3C, 16, 6, 0x7000, 0xA82A);
  245.   /* You must specify a configuration before calling this routine.
  246.    * If you are getting or setting multiple preferences, you should place
  247.    * these calls within an ICBegin/ICEnd pair.
  248.    * If you call this routine outside of such a pair, it implicitly
  249.    * calls ICBegin(inst, icReadOnlyPerm).
  250.    * Reads the preference specified by key from the IC database to the
  251.    * buffer pointed to by buf and size.
  252.    * key must not be the empty string.
  253.    * If buf is nil then no data is returned.
  254.    * size must be non-negative.
  255.    * attr and size are always set on return. On errors (except icTruncatedErr)
  256.    * attr is set to ICattr_no_change and size is set to 0.
  257.    * size is the actual size of the data.
  258.    * attr is set to the attributes associated with the preference.
  259.    * If this routine returns icTruncatedErr then the other returned
  260.    * values are valid except that only the first size bytes have been
  261.    * return. size is adjusted to reflect the true size of the preference.
  262.    * Returns icPrefNotFound if there is no preference for the key.
  263.    */
  264.  
  265. pascal ICError ICCSetPref(internetConfigurationComponent inst, ConstStr255Param key, ICAttr attr, Ptr buf, long size)
  266. FIVEWORDINLINE(0x2F3C, 16, 7, 0x7000, 0xA82A);
  267.   /* You must specify a configuration before calling this routine.
  268.    * If you are getting or setting multiple preferences, you should place
  269.    * these calls within an ICBegin/ICEnd pair.
  270.    * If you call this routine outside of such a pair, it implicitly
  271.    * calls ICBegin(inst, icReadWritePerm).
  272.    * Sets the preference specified by key from the IC database to the
  273.    * value pointed to by buf and size.
  274.    * key must not be the empty string.
  275.    * size must be non-negative. 
  276.    * If buf is nil then the preference value is not set and size is ignored.
  277.    * If buf is not nil then the preference value is set to the size
  278.    * bytes pointed to by buf.
  279.    * If attr is ICattr_no_change then the preference attributes are not set.
  280.    * Otherwise the preference attributes are set to attr.
  281.    * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  282.    * Returns icPermErr if current attr is locked, new attr is locked and buf <> nil.
  283.    */
  284.  
  285. pascal ICError ICCFindPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Handle prefh)
  286. FIVEWORDINLINE(0x2F3C, 12, 36, 0x7000, 0xA82A);
  287.   /* Requires IC 1.2.
  288.    * You must specify a configuration before calling this routine.
  289.    * If you are getting or setting multiple preferences, you should place
  290.    * these calls within an ICBegin/ICEnd pair.
  291.    * If you call this routine outside of such a pair, it implicitly
  292.    * calls ICBegin(inst, icReadWritePerm).
  293.    * This routine effectively replaces ICGetPrefHandle.
  294.    * Reads the preference specified by key from the IC database into
  295.    * a handle, prefh.
  296.    * key must not be the empty string.
  297.    * attr is set to the attributes associated with the preference.
  298.    * You must set prefh to a non-nil handle before calling this routine.
  299.    * If the preference does not exist, icPrefNotFoundErr is returned.
  300.    */
  301.  
  302. pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Handle *prefh)
  303. FIVEWORDINLINE(0x2F3C, 12, 26, 0x7000, 0xA82A);
  304.   /* Requires IC 1.1.
  305.    * You must specify a configuration before calling this routine.
  306.    * If you are getting or setting multiple preferences, you should place
  307.    * these calls within an ICBegin/ICEnd pair.
  308.    * If you call this routine outside of such a pair, it implicitly
  309.    * calls ICBegin(inst, icReadOnlyPerm).
  310.    * This routine is now obsolete. Use ICFindPrefHandle instead.
  311.    * Reads the preference specified by key from the IC database into
  312.    * a newly created handle, prefh.
  313.    * key must not be the empty string.
  314.    * attr is set to the attributes associated with the preference.
  315.    * The incoming value of prefh is ignored.
  316.    * A new handle is created in the current heap and returned in prefh.
  317.    * If the routine returns an error, prefh is set to nil.
  318.    * If the preference does not exist, no error is returned and prefh is set
  319.    * to an empty handle.
  320.    */
  321.  
  322. pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr attr, Handle prefh)
  323. FIVEWORDINLINE(0x2F3C, 12, 27, 0x7000, 0xA82A);
  324.   /* Requires IC 1.1.
  325.    * You must specify a configuration before calling this routine.
  326.    * If you are getting or setting multiple preferences, you should place
  327.    * these calls within an ICBegin/ICEnd pair.
  328.    * If you call this routine outside of such a pair, it implicitly
  329.    * calls ICBegin(inst, icReadWritePerm).
  330.    * Sets the preference specified by key from the IC database to the
  331.    * value contained in prefh.
  332.    * key must not be the empty string.
  333.    * If prefh is nil then the preference value is not set.
  334.    * If buf is not nil then the preference value is set to the data
  335.    * contained in it.
  336.    * If attr is ICattr_no_change then the preference attributes are not set.
  337.    * Otherwise the preference attributes are set to attr.
  338.    * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  339.    * Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil.
  340.    */
  341.  
  342. pascal ICError ICCCountPref(internetConfigurationComponent inst, long *count)
  343. FIVEWORDINLINE(0x2F3C, 4, 8, 0x7000, 0xA82A);
  344.   /* You must specify a configuration before calling this routine.
  345.    * You must be inside an ICBegin/End pair to call this routine.
  346.    * Counts the total number of preferences.
  347.    * If the routine returns an error, count is set to 0.
  348.    */
  349.  
  350. pascal ICError ICCGetIndPref(internetConfigurationComponent inst, long n, Str255 key)
  351. FIVEWORDINLINE(0x2F3C, 8, 9, 0x7000, 0xA82A);
  352.   /* You must specify a configuration before calling this routine.
  353.    * You must be inside an ICBegin/End pair to call this routine.
  354.    * Returns the key of the Nth preference.
  355.    * n must be positive.
  356.    * Returns icPrefNotFoundErr if n is greater than the total number of preferences.
  357.    * If the routine returns an error, key is undefined.
  358.    */
  359.  
  360. pascal ICError ICCDeletePref(internetConfigurationComponent inst, ConstStr255Param key)
  361. FIVEWORDINLINE(0x2F3C, 4, 12, 0x7000, 0xA82A);
  362.   /* You must specify a configuration before calling this routine.
  363.    * You must be inside an ICBegin/End pair to call this routine.
  364.    * Deletes the preference specified by key.
  365.    * key must not be the empty string.
  366.    * Returns icPrefNotFound if the preference specified by key is not present.
  367.    */
  368.  
  369. pascal ICError ICCEnd(internetConfigurationComponent inst)
  370. FIVEWORDINLINE(0x2F3C, 0, 10, 0x7000, 0xA82A);
  371.   /* You must specify a configuration before calling this routine.
  372.    * You must be inside an ICBegin/End pair to call this routine.
  373.    * Terminates a preference session, as started by ICBegin.
  374.    * You must have called ICBegin before calling this routine.
  375.    */
  376.  
  377. /* ***** User Interface Stuff ***** */
  378.  
  379. pascal ICError ICCEditPreferences(internetConfigurationComponent inst, ConstStr255Param key)
  380. FIVEWORDINLINE(0x2F3C, 4, 15, 0x7000, 0xA82A);
  381.   /* Requires IC 1.1.
  382.    * You must specify a configuration before calling this routine.
  383.    * You do not have to be inside an ICBegin/End pair to call this routine.
  384.    * Instructs IC to display the user interface associated with editing
  385.    * preferences and focusing on the preference specified by key.
  386.    * If key is the empty string then no preference should be focused upon.
  387.    * You must have specified a configuration before calling this routine.
  388.    * You do not need to call ICBegin before calling this routine.
  389.    * In the current implementation this launches the IC application
  390.    * (or brings it to the front) and displays the window containing
  391.    * the preference specified by key.
  392.    * It may have a radically different implementation in future
  393.    * IC systems.
  394.    */
  395.  
  396. /* ***** URL Handling ***** */
  397.  
  398. pascal ICError ICCParseURL(internetConfigurationComponent inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd, Handle url)
  399. FIVEWORDINLINE(0x2F3C, 24, 16, 0x7000, 0xA82A);
  400.   /* Requires IC 1.1.
  401.    * You must specify a configuration before calling this routine.
  402.    * You do not have to be inside an ICBegin/End pair to call this routine.
  403.    * Parses a URL out of the specified text and returns it in a canonical form
  404.    * in a handle.
  405.    * hint indicates the default scheme for URLs of the form "name@address".
  406.    * If hint is the empty string then URLs of that form are not allowed.
  407.    * data points to the start of the text. It must not be nil.
  408.    * len indicates the length of the text. It must be non-negative.
  409.    * selStart and selEnd should be passed in as the current selection of
  410.    * the text. This selection is given in the same manner as TextEdit,
  411.    * ie if selStart = selEnd then there is no selection only an insertion
  412.    * point. Also selStart イ selEnd and 0 イ selStart イ len and 0 イ selEnd イ len.
  413.    * selStart and selEnd are returned as the bounds of the URL. If the
  414.    * routine returns an error then these new boundaries may be
  415.    * invalid but they will be close.
  416.    * The incoming url handle must not be nil.  The resulting URL is normalised
  417.    * and copied into the url handle, which is resized to fit.
  418.    */
  419.  
  420. pascal ICError ICCLaunchURL(internetConfigurationComponent inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd)
  421. FIVEWORDINLINE(0x2F3C, 20, 17, 0x7000, 0xA82A);
  422.   /* Requires IC 1.1.
  423.    * You must specify a configuration before calling this routine.
  424.    * You do not have to be inside an ICBegin/End pair to call this routine.
  425.    * Parses a URL out of the specified text and feeds it off to the
  426.    * appropriate helper.
  427.    * hint indicates the default scheme for URLs of the form "name@address".
  428.    * If hint is the empty string then URLs of that form are not allowed.
  429.    * data points to the start of the text. It must not be nil.
  430.    * len indicates the length of the text. It must be non-negative.
  431.    * selStart and selEnd should be passed in as the current selection of
  432.    * the text. This selection is given in the same manner as TextEdit,
  433.    * ie if selStart = selEnd then there is no selection only an insertion
  434.    * point. Also selStart イ selEnd and 0 イ selStart イ len and 0 イ selEnd イ len.
  435.    * selStart and selEnd are returned as the bounds of the URL. If the
  436.    * routine returns an error then these new boundaries may be
  437.    * invalid but they will be close.
  438.    * The URL is parsed out of the text and passed off to the appropriate
  439.    * helper using the GURL AppleEvent.
  440.    */
  441.  
  442. /* ***** Mappings Routines *****
  443.  * 
  444.  * Routines for interrogating mappings database.
  445.  * 
  446.  * ----- High Level Routines -----
  447.  */
  448.  
  449. pascal ICError ICCMapFilename(internetConfigurationComponent inst, ConstStr255Param filename, ICMapEntry *entry)
  450. FIVEWORDINLINE(0x2F3C, 8, 24, 0x7000, 0xA82A);
  451.   /* Requires IC 1.1.
  452.    * You must specify a configuration before calling this routine.
  453.    * If you are getting or setting multiple preferences, you should place
  454.    * these calls within an ICBegin/ICEnd pair.
  455.    * If you call this routine outside of such a pair, it implicitly
  456.    * calls ICBegin(inst, icReadWritePerm).
  457.    * Takes the name of an incoming file and returns the most appropriate
  458.    * mappings database entry, based on its extension.
  459.    * filename must not be the empty string.
  460.    * Returns icPrefNotFoundErr if no suitable entry is found.
  461.    */
  462.  
  463. pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry)
  464. FIVEWORDINLINE(0x2F3C, 16, 25, 0x7000, 0xA82A);
  465.   /* Requires IC 1.1.
  466.    * You must specify a configuration before calling this routine.
  467.    * You must be inside an ICBegin/End pair to call this routine.
  468.    * Takes the type and creator (and optionally the name) of an outgoing
  469.    * file and returns the most appropriate mappings database entry.
  470.    * The filename may be either the name of the outgoing file or
  471.    * the empty string.
  472.    * Returns icPrefNotFoundErr if no suitable entry found.
  473.    */
  474.  
  475. /* ----- Mid Level Routines ----- */
  476.  
  477. pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst, Handle entries, ConstStr255Param filename, ICMapEntry *entry)
  478. FIVEWORDINLINE(0x2F3C, 12, 28, 0x7000, 0xA82A);
  479.   /* Requires IC 1.1.
  480.    * You must specify a configuration before calling this routine.
  481.    * You do not have to be inside an ICBegin/End pair to call this routine.
  482.    * Takes the name of an incoming file and returns the most appropriate
  483.    * mappings database entry, based on its extension.
  484.    * entries must be a handle to a valid IC mappings database preference.
  485.    * filename must not be the empty string.
  486.    * Returns icPrefNotFoundErr if no suitable entry is found.
  487.    */
  488.  
  489. pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst, Handle entries, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry)
  490. FIVEWORDINLINE(0x2F3C, 20, 29, 0x7000, 0xA82A);
  491.   /* Requires IC 1.1.
  492.    * You must specify a configuration before calling this routine.
  493.    * You do not have to be inside an ICBegin/End pair to call this routine.
  494.    * Takes the type and creator (and optionally the name) of an outgoing
  495.    * file and returns the most appropriate mappings database entry.
  496.    * entries must be a handle to a valid IC mappings database preference.
  497.    * The filename may be either the name of the outgoing file or
  498.    * the empty string.
  499.    * Returns icPrefNotFoundErr if no suitable entry found.
  500.    */
  501.  
  502. /* ----- Low Level Routines ----- */
  503.  
  504. pascal ICError ICCCountMapEntries(internetConfigurationComponent inst, Handle entries, long *count)
  505. FIVEWORDINLINE(0x2F3C, 8, 18, 0x7000, 0xA82A);
  506.   /* Requires IC 1.1.
  507.    * You must specify a configuration before calling this routine.
  508.    * You do not have to be inside an ICBegin/End pair to call this routine.
  509.    * Counts the number of entries in the mappings database.
  510.    * entries must be a handle to a valid IC mappings database preference.
  511.    * count is set to the number of entries.
  512.    */
  513.  
  514. pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst, Handle entries, long ndx, long *pos, ICMapEntry *entry)
  515. FIVEWORDINLINE(0x2F3C, 16, 19, 0x7000, 0xA82A);
  516.   /* Requires IC 1.1.
  517.    * You must specify a configuration before calling this routine.
  518.    * You do not have to be inside an ICBegin/End pair to call this routine.
  519.    * Gets the ndx'th entry in the mappings database.
  520.    * entries must be a handle to a valid IC mappings database preference.
  521.    * ndx must be in the range from 1 to the number of entries in the database.
  522.    * The value of pos is ignored on input. pos is set to the position of
  523.    * the ndx'th entry in the database and is suitable for passing back
  524.    * into ICSetMapEntry.
  525.    * Does not return any user data associated with the entry.
  526.    */
  527.  
  528. pascal ICError ICCGetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry)
  529. FIVEWORDINLINE(0x2F3C, 12, 20, 0x7000, 0xA82A);
  530.   /* Requires IC 1.1.
  531.    * You must specify a configuration before calling this routine.
  532.    * You do not have to be inside an ICBegin/End pair to call this routine.
  533.    * Returns the entry located at position pos in the mappings database.
  534.    * entries must be a handle to a valid IC mappings database preference.
  535.    * pos should be 0 to get the first entry. To get the subsequent entries, add
  536.    * entry.total_size to pos and iterate.
  537.    * Does not return any user data associated with the entry.
  538.    */
  539.  
  540. pascal ICError ICCSetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry)
  541. FIVEWORDINLINE(0x2F3C, 12, 21, 0x7000, 0xA82A);
  542.   /* Requires IC 1.1.
  543.    * You must specify a configuration before calling this routine.
  544.    * You do not have to be inside an ICBegin/End pair to call this routine.
  545.    * Sets the entry located at position pos in the mappings database.
  546.    * entries must be a handle to a valid IC mappings database preference.
  547.    * pos should be either a value returned from ICGetIndMapEntry or a value
  548.    * calculated using ICGetMapEntry.
  549.    * entry is a var parameter purely for stack space reasons. It is not
  550.    * modified in any way.
  551.    * Any user data associated with the entry is unmodified.
  552.    */
  553.  
  554. pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst, Handle entries, long pos)
  555. FIVEWORDINLINE(0x2F3C, 8, 22, 0x7000, 0xA82A);
  556.   /* Requires IC 1.1.
  557.    * You must specify a configuration before calling this routine.
  558.    * You do not have to be inside an ICBegin/End pair to call this routine.
  559.    * Deletes the mappings database entry at pos.
  560.    * entries must be a handle to a valid IC mappings database preference.
  561.    * pos should be either a value returned from ICGetIndMapEntry or a value
  562.    * calculated using ICGetMapEntry.
  563.    * Also deletes any user data associated with the entry.
  564.    */
  565.  
  566. pascal ICError ICCAddMapEntry(internetConfigurationComponent inst, Handle entries, ICMapEntry *entry)
  567. FIVEWORDINLINE(0x2F3C, 8, 23, 0x7000, 0xA82A);
  568.   /* Requires IC 1.1.
  569.    * You must specify a configuration before calling this routine.
  570.    * You do not have to be inside an ICBegin/End pair to call this routine.
  571.    * Adds an entry to the mappings database.
  572.    * entries must be a handle to a valid IC mappings database preference.
  573.    * The entry is added to the end of the entries database.
  574.    * No user data is added.
  575.    */
  576.  
  577.  
  578. /* ・・・End ICCAPI.h・・・ */
  579.  
  580. #ifdef __cplusplus
  581. }
  582. #endif __cplusplus
  583.  
  584. #endif
  585.